Post

Replies

Boosts

Views

Activity

Reply to Where to get 5.5 inch iPhone screenshots for submission
For anyone coming in 2024, I found this helpful. You do have to add the simulator runtime as suggested, but that's not enough to add it as a run destination. For that, you need to: Came here to add something important. I experienced this problem in Xcode 15.4 - wasn't able to select iPhone 8 Pro as a simulator destination because it didn't appear in the list. In order to get it to show in the selectable list, you have to set the 'Minimum Deployments' target to 16.4 or 15.0 for iPhone 8 Plus.
Aug ’24
Reply to How does a timeline select which date to display?
One is that you aren’t actually providing all the timeline entries you think you are. That was my first thought, but I triple checked. There were entries for everyday of the week on the timeline, but on Tuesday it was displaying the entry for Monday. It was only when I deleted the Monday entry that it displayed Tuesday. I display the full date in the widget for debugging purposes, and it is indeed Monday. I "fixed" it by just looking at the current date and time when displaying my small day widget, regardless of the passed in value. f you want it to show correctly you need to make sure the time is zeroed out to midnight For your entries. Sorry, I don't understand what that means. Entries are Mon-Fri at 3PM, for example. thanks
Dec ’23
Reply to Get queue and current item from ApplicationMusicPlayer?
This is how I did it in a class, not in a view: var queueObserver: AnyCancellable? let musicPlayer = ApplicationMusicPlayer.shared if queueObserver == nil { queueObserver = musicPlayer.queue.objectWillChange .sink { [weak self] in self?.queueDidChange() } } return musicPlayer } private func queueDidChange() { // When we get this event, the song hasn't actually changed yet so we try a little later. DispatchQueue.main.asyncAfter(deadline: .now() + 2.0, execute: { NowPlaying.shared.setSong(self.musicPlayer.queue.currentEntry?.title ?? "Unknown") }) }
Aug ’23
Reply to Change the Volume for ApplicationMusicPlayer to hear the voice synthesizer?
The answer was to set the audio session to duckmode. Before using the speech synthesizer I set the session to duck mode and then I set it back to mixed mode after. This causes music played through musickit to lower in volume. It doesn't work with AVAudioPlayer, so for music I play through AVAudioPlayer I still have to lower the volume while the synthesizer is playing. It also doesn't work well when musickit is playing, the synthezier is playing, and there's a sound effect playing through AvAudioPlayer. There's no way for the session to be configured correctly. func setDuckMode() { do { try AVAudioSession.sharedInstance().setActive(false) try AVAudioSession.sharedInstance().setCategory( .playback, mode: .default, options: [.duckOthers]) try AVAudioSession.sharedInstance().setActive(true) } catch { print( "Could not init sound duck. \(error)") } }
Aug ’23
Reply to Xcode 14: Publishing changes from within view updates
This problem is still occurring in Xcode Version 14.0.1 (14A400). The context is a button that's pressed to exit a view that is controlled with:   .fullScreenCover(isPresented: $settings.showWorkout) Wrapping it in DispatchQueue.main.asyncAfter made no difference. I honestly have no idea what's wrong with this or how it can be done differently. It doesn't seem to cause any harm. Will an app be rejected with these kinds of warnings?
Sep ’22
Reply to Does a subscription that goes 100% to a subscriber need to use IAP?
From stackoverflow: Yes, you wouldn't need to use in-app purchases for this. Apple calls them "Person-to-Person Services." From the review guidelines: .3(d) Person-to-Person Services: If your app enables the purchase of realtime person-to-person services between two individuals (for example tutoring students, medical consultations, real estate tours, or fitness training), you may use purchase methods other than in-app purchase to collect those payments. One-to-few and one-to-many realtime services must use in-app purchase.
May ’21